package com.yer.note.entity;

public class LabelDiary implements Comparable<LabelDiary>{
    public int number;
    public int amount;
    String label;

    public LabelDiary() {

    }

    public LabelDiary(int number, int amount, String label) {
        this.number = number;
        this.amount = amount;
        this.label = label;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String toString() {
        return "LabelDiary{" +
                "amount=" + amount +
                ", label='" + label + '\'' +
                '}';
    }

    //降序排序
    @Override
    public int compareTo(LabelDiary labelDiary) {
        return labelDiary.getAmount()-this.getAmount();
    }
}
